package cn.tangsihai.quartz.service.impl;

import cn.tangsihai.quartz.service.IQuartzService;
import cn.tangsihai.quartz.util.QuartzUtil;
import org.quartz.Scheduler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class QuartzServiceimpl implements IQuartzService {
    @Autowired
    private Scheduler scheduler;
    @Override
    public void orderOverTime(String jobName, Class cls, Object params, Date excuteTime) {
        QuartzUtil.addJob(scheduler, jobName, cls, params, excuteTime);
    }
}
